Integrand size = 41, antiderivative size = 141 \[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=-\frac {2 a (5 A+5 B+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (3 A+B+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+5 B+3 C) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \]
-2/5*a*(5*A+5*B+3*C)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*Ellip ticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/3*a*(3*A+B+C)*(cos(1/2*d*x+1/2*c)^2)^ (1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/5*a*C*s in(d*x+c)/d/cos(d*x+c)^(5/2)+2/3*a*(B+C)*sin(d*x+c)/d/cos(d*x+c)^(3/2)+2/5 *a*(5*A+5*B+3*C)*sin(d*x+c)/d/cos(d*x+c)^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 8.33 (sec) , antiderivative size = 1228, normalized size of antiderivative = 8.71 \[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx =\text {Too large to display} \]
Integrate[((a + a*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/S qrt[Cos[c + d*x]],x]
a*(Sqrt[Cos[c + d*x]]*(1 + Cos[c + d*x])*Sec[c/2 + (d*x)/2]^2*(((5*A + 5*B + 3*C)*Csc[c]*Sec[c])/(5*d) + (C*Sec[c]*Sec[c + d*x]^3*Sin[d*x])/(5*d) + (Sec[c]*Sec[c + d*x]^2*(3*C*Sin[c] + 5*B*Sin[d*x] + 5*C*Sin[d*x]))/(15*d) + (Sec[c]*Sec[c + d*x]*(5*B*Sin[c] + 5*C*Sin[c] + 15*A*Sin[d*x] + 15*B*Sin [d*x] + 9*C*Sin[d*x]))/(15*d)) - (A*(1 + Cos[c + d*x])*Csc[c]*Hypergeometr icPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x)/2]^2 *Sec[d*x - ArcTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt [1 + Cot[c]^2]*Sin[c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTa n[Cot[c]]]])/(d*Sqrt[1 + Cot[c]^2]) - (B*(1 + Cos[c + d*x])*Csc[c]*Hyperge ometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x) /2]^2*Sec[d*x - ArcTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[- (Sqrt[1 + Cot[c]^2]*Sin[c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/(3*d*Sqrt[1 + Cot[c]^2]) - (C*(1 + Cos[c + d*x])*Csc[c]* HypergeometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x)/2]^2*Sec[d*x - ArcTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]] *Sqrt[-(Sqrt[1 + Cot[c]^2]*Sin[c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin [d*x - ArcTan[Cot[c]]]])/(3*d*Sqrt[1 + Cot[c]^2]) + (A*(1 + Cos[c + d*x])* Csc[c]*Sec[c/2 + (d*x)/2]^2*((HypergeometricPFQ[{-1/2, -1/4}, {3/4}, Cos[d *x + ArcTan[Tan[c]]]^2]*Sin[d*x + ArcTan[Tan[c]]]*Tan[c])/(Sqrt[1 - Cos[d* x + ArcTan[Tan[c]]]]*Sqrt[1 + Cos[d*x + ArcTan[Tan[c]]]]*Sqrt[Cos[c]*Co...
Time = 0.84 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.97, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.366, Rules used = {3042, 4600, 3042, 3510, 27, 3042, 3500, 27, 3042, 3227, 3042, 3116, 3042, 3119, 3120}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a \sec (c+d x)+a) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sec (c+d x)+a) \left (A+B \sec (c+d x)+C \sec (c+d x)^2\right )}{\sqrt {\cos (c+d x)}}dx\) |
\(\Big \downarrow \) 4600 |
\(\displaystyle \int \frac {(a \cos (c+d x)+a) \left (A \cos ^2(c+d x)+B \cos (c+d x)+C\right )}{\cos ^{\frac {7}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (A \sin \left (c+d x+\frac {\pi }{2}\right )^2+B \sin \left (c+d x+\frac {\pi }{2}\right )+C\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^{7/2}}dx\) |
\(\Big \downarrow \) 3510 |
\(\displaystyle \frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int -\frac {5 a A \cos ^2(c+d x)+a (5 A+5 B+3 C) \cos (c+d x)+5 a (B+C)}{2 \cos ^{\frac {5}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{5} \int \frac {5 a A \cos ^2(c+d x)+a (5 A+5 B+3 C) \cos (c+d x)+5 a (B+C)}{\cos ^{\frac {5}{2}}(c+d x)}dx+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \int \frac {5 a A \sin \left (c+d x+\frac {\pi }{2}\right )^2+a (5 A+5 B+3 C) \sin \left (c+d x+\frac {\pi }{2}\right )+5 a (B+C)}{\sin \left (c+d x+\frac {\pi }{2}\right )^{5/2}}dx+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle \frac {1}{5} \left (\frac {2}{3} \int \frac {3 a (5 A+5 B+3 C)+5 a (3 A+B+C) \cos (c+d x)}{2 \cos ^{\frac {3}{2}}(c+d x)}dx+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int \frac {3 a (5 A+5 B+3 C)+5 a (3 A+B+C) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)}dx+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int \frac {3 a (5 A+5 B+3 C)+5 a (3 A+B+C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (3 a (5 A+5 B+3 C) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)}dx+5 a (3 A+B+C) \int \frac {1}{\sqrt {\cos (c+d x)}}dx\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (3 a (5 A+5 B+3 C) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx+5 a (3 A+B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3116 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 a (3 A+B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 a (5 A+5 B+3 C) \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\int \sqrt {\cos (c+d x)}dx\right )\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 a (3 A+B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 a (5 A+5 B+3 C) \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx\right )\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 a (3 A+B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 a (5 A+5 B+3 C) \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (\frac {10 a (3 A+B+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+3 a (5 A+5 B+3 C) \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )\right )+\frac {10 a (B+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\right )+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}\) |
(2*a*C*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + ((10*a*(B + C)*Sin[c + d*x ])/(3*d*Cos[c + d*x]^(3/2)) + ((10*a*(3*A + B + C)*EllipticF[(c + d*x)/2, 2])/d + 3*a*(5*A + 5*B + 3*C)*((-2*EllipticE[(c + d*x)/2, 2])/d + (2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])))/3)/5
3.12.92.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1))), x] + Simp[(n + 2)/(b^2*(n + 1)) I nt[(b*Sin[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && IntegerQ[2*n]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S imp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) ))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F reeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x _)])^(m_.)*((A_.) + (B_.)*sec[(e_.) + (f_.)*(x_)] + (C_.)*sec[(e_.) + (f_.) *(x_)]^2), x_Symbol] :> Simp[d^(m + 2) Int[(b + a*Cos[e + f*x])^m*(d*Cos[ e + f*x])^(n - m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; Fr eeQ[{a, b, d, e, f, A, B, C, n}, x] && !IntegerQ[n] && IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(711\) vs. \(2(177)=354\).
Time = 2.59 (sec) , antiderivative size = 712, normalized size of antiderivative = 5.05
int((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2),x,me thod=_RETURNVERBOSE)
-4*(-(-2*cos(1/2*d*x+1/2*c)^2+1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*a*(1/2*A*(sin (1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^2+1)^(1/2)/(-2*sin(1/2*d*x +1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2) )+1/10*C/(8*sin(1/2*d*x+1/2*c)^6-12*sin(1/2*d*x+1/2*c)^4+6*sin(1/2*d*x+1/2 *c)^2-1)/sin(1/2*d*x+1/2*c)^2*(24*sin(1/2*d*x+1/2*c)^6*cos(1/2*d*x+1/2*c)- 12*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)* (sin(1/2*d*x+1/2*c)^2)^(1/2)*sin(1/2*d*x+1/2*c)^4-24*cos(1/2*d*x+1/2*c)*si n(1/2*d*x+1/2*c)^4+12*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*(2*sin(1/2*d*x +1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*sin(1/2*d*x+1/2*c)^2+8*sin (1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)-3*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2 ))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2))*(-2*sin( 1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)+(1/2*B+1/2*C)*(-1/6*cos(1/2*d *x+1/2*c)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(cos(1/2*d* x+1/2*c)^2-1/2)^2+1/3*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^ 2+1)^(1/2)/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF( cos(1/2*d*x+1/2*c),2^(1/2)))+(1/2*A+1/2*B)/sin(1/2*d*x+1/2*c)^2/(2*sin(1/2 *d*x+1/2*c)^2-1)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*s in(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)-EllipticE(cos(1/2*d*x+1/2*c),2^(1/2 ))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)))/sin(1/2 *d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.11 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.66 \[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {-5 i \, \sqrt {2} {\left (3 \, A + B + C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} {\left (3 \, A + B + C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} {\left (5 \, A + 5 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} {\left (5 \, A + 5 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, {\left (5 \, A + 5 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{2} + 5 \, {\left (B + C\right )} a \cos \left (d x + c\right ) + 3 \, C a\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{3}} \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2 ),x, algorithm="fricas")
1/15*(-5*I*sqrt(2)*(3*A + B + C)*a*cos(d*x + c)^3*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + 5*I*sqrt(2)*(3*A + B + C)*a*cos(d*x + c)^3*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 3*I*sqrt( 2)*(5*A + 5*B + 3*C)*a*cos(d*x + c)^3*weierstrassZeta(-4, 0, weierstrassPI nverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + 3*I*sqrt(2)*(5*A + 5*B + 3 *C)*a*cos(d*x + c)^3*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos (d*x + c) - I*sin(d*x + c))) + 2*(3*(5*A + 5*B + 3*C)*a*cos(d*x + c)^2 + 5 *(B + C)*a*cos(d*x + c) + 3*C*a)*sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d *x + c)^3)
\[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=a \left (\int \frac {A}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {A \sec {\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {B \sec {\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {B \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{3}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx\right ) \]
a*(Integral(A/sqrt(cos(c + d*x)), x) + Integral(A*sec(c + d*x)/sqrt(cos(c + d*x)), x) + Integral(B*sec(c + d*x)/sqrt(cos(c + d*x)), x) + Integral(B* sec(c + d*x)**2/sqrt(cos(c + d*x)), x) + Integral(C*sec(c + d*x)**2/sqrt(c os(c + d*x)), x) + Integral(C*sec(c + d*x)**3/sqrt(cos(c + d*x)), x))
\[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2 ),x, algorithm="maxima")
integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)/sqr t(cos(d*x + c)), x)
\[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2 ),x, algorithm="giac")
integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)/sqr t(cos(d*x + c)), x)
Time = 19.86 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.54 \[ \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {6\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+30\,A\,a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+10\,B\,a\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{15\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {2\,A\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,B\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
(6*C*a*sin(c + d*x)*hypergeom([-5/4, 1/2], -1/4, cos(c + d*x)^2) + 30*A*a* cos(c + d*x)^2*sin(c + d*x)*hypergeom([-1/4, 1/2], 3/4, cos(c + d*x)^2) + 10*B*a*cos(c + d*x)*sin(c + d*x)*hypergeom([-3/4, 1/2], 1/4, cos(c + d*x)^ 2))/(15*d*cos(c + d*x)^(5/2)*(1 - cos(c + d*x)^2)^(1/2)) + (2*A*a*elliptic F(c/2 + (d*x)/2, 2))/d + (2*B*a*sin(c + d*x)*hypergeom([-1/4, 1/2], 3/4, c os(c + d*x)^2))/(d*cos(c + d*x)^(1/2)*(sin(c + d*x)^2)^(1/2)) + (2*C*a*sin (c + d*x)*hypergeom([-3/4, 1/2], 1/4, cos(c + d*x)^2))/(3*d*cos(c + d*x)^( 3/2)*(sin(c + d*x)^2)^(1/2))